<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理训练师</title>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>
<body>
<div class="container">
    <div class="sidebar">
        <img src="imgs/login.png"  class="rounded-image">
        <h2>菜单栏</h2>
        <ul>
            <li><a href="indexServlet">首页</a></li>
            <li><a href="pokemonallServlet">管理宝可梦</a></li>
            <li><a href="trainerallServlet">管理训练师</a></li>
            <img src="imgs/qiu.png">
        </ul>
    </div>
    <div class="main-content">
        <div class="header">
            <h1>管理训练师</h1>
        </div>
        <div class="table-container">
            <table>
                <tr>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th>地区</th>
                    <th>操作</th>
                </tr>
                <c:forEach items="${trainers}" var="trainer" varStatus="status">

                <tr>
                    <td>${trainer.name}</td>
                    <td>${trainer.sex}</td>
                    <td>${trainer.age}</td>
                    <td>${trainer.area}</td>
                    <td><a href="/untitled_war/selecttrainerbyidServlet?id=${trainer.id}"><button id="editButton">修改</button></a>       <a href="/untitled_war/deletetrainerServlet?id=${trainer.id}"><button id="editButton">删除</button></a></td>
                </tr>
                </c:forEach>
            </table>
            <div class="edit-button-container">
                <a href="addtrainer.jsp"> <button id="editButton" type="button" class="type-button">新增训练师</button></a>
            </div>
        </div>
    </div>
</div>
</body>
</html>